package com.youuvs;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
public class JsonResult {

    private Boolean success = true;
    private String msg = "操作成功";
    //用来封装文件上传所需参数
    //private Object resultObj;
    public JsonResult(Boolean success, String msg) {
        this.success = success;
        this.msg = msg;
    }

    public JsonResult() {
    }

   /* public void setSuccess(Boolean success) {
        this.success = success;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }*/

    public JsonResult me(){
        this.setSuccess(false);
        this.setMsg("操作失败");

        return this;
    }

    public JsonResult setMsg(String msg) {
        this.success = false;
        this.msg = msg;
        return this;
    }


}
